#pragma once
#include "CRasterizerEdgeStore.h"
#include "CMILMatrix.h"
class CRasterizerLayerEdgeStore :
	public CRasterizerEdgeStore
{


private: 
	CRasterizerLayerEdgeStore(const CFrameVectorBuffer * pDestinationVB, XBOOL fCopiesBoundsFromBrushLayer, enum XcpFillMode fillMode, CLayer * pBrushLayer);
private: 
	virtual ~CRasterizerLayerEdgeStore();
public: 
	static HRESULT Create(const CFrameVectorBuffer * pDestinationVB, enum XcpFillMode fillMode, XUINT32 fCopiesBoundsFromLayer, CRasterizerLayerEdgeStore * * ppLayerEdgeStore);
	virtual void SetOffset(const CMILMatrix * pOffset);
	virtual void SetOffset(struct XPOINTF * pOffset);
	virtual void NWSetBrushSpan(struct IBrushSpan * pBrushSpan);
	void NWUpdateRenderParams(struct SharedRenderParams & sharedRP, struct NWRenderParams & nwRP);
	void NWEnsureTargetLayer(CLayer * pTargetLayer);
	void NWSetOpacityAndOpacityMask(XFLOAT rOpacity, CBrush * pOpacityMaskBrush, const CMILMatrix * pOpacityMaskTransform, struct XRECTF_WH * pOpacityMaskBounds);
	HRESULT NWAddToFrameBuffer(CFrameVectorBuffer * pFrameVectorBuffer, XBOOL fOpacityMaskBrushChanged, XBOOL fIsLayerSharedBetweenVectorBuffers, XBOOL fUpdateLayerWithoutAdding);
	void NWBreakLayerCycle();
private: 
	XUINT32 m_fCopiesBoundsFromBrushLayer:1;
	XBOOL m_fHasExplicitOpacityMaskBounds:1;
	CBrush * m_pOpacityMaskBrush;
	struct XRECTF_WH m_opacityMaskBounds;
	CMILMatrix m_opacityMaskTransform;
	const CFrameVectorBuffer * m_pDestinationVectorBuffer;


};